import 'package:flutter/material.dart';

/// 创建时间：2024/1/24
/// 作者：wangjianhua
/// 描述：

class FinishedList extends StatelessWidget {
  const FinishedList({super.key});

  List<Widget> lists() {
    List<Widget> l = [];

    for (String set in ['1','2','3']) {
      l.add(Container(

        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(
              set,
              style: const TextStyle(
                  color: Colors.black,
                  fontSize: 20,
                  fontWeight: FontWeight.w300),
            ),

          ],
        ),
      ));
    }
    return l;
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text("设置"),
        leading: IconButton(onPressed: (){
          Navigator.of(context).pop();
        }, icon: const Icon(Icons.arrow_back_ios)),
      ),
      body: Center(
        child: Container(
          color: Colors.white,
          child: ListView(
            shrinkWrap: false,
            // 竖直方向上布局
            scrollDirection: Axis.vertical,
            padding: const EdgeInsets.all(10),
            // 每个自组件的高度
            itemExtent: 50,
            children: lists(),
          )),
        ),
    );
  }
}

